import request from '@/utils/request'
// -------- 学习 --------

// 获取学习角色 /assess/exam/roleList
export const getExamRoleListApi = (params) =>{
    return request({
        url: '/assess/exam/roleList',
        method: 'get',
        params
    })
}

// 修改学习角色
export const editRoleChangeStatusApi = (data) =>{
    return request({
        url: '/system/role/changeStatus',
        method: 'put',
        data
    })
}

// 删除学习角色
export const deleteStudyRoleApi = (params) =>{
    return request({
        url: '/system/role/deleteStudyRole',
        method: 'delete',
        params
    })
}

// 查询所有系统用户 /system/role/list
export const getRoleListApi = () =>{
    return request({
        url: '/system/role/list',
        method: 'get',
    })
}

// 添加系统角色和自定义角色 /system/role
export const addStudyRoleApi = (data) =>{
    return request({
        url: '/system/role/addStudyRole',
        method: 'post',
        data
    })
}

// 查询所有科目 /assess/exam/list
export const getExamListApi = (params)=>{
    return request({
        url: '/assess/exam/list',
        method: 'get',
        params
    })
}

// 添加一个科目 /assess/exam/add
export const addAssessExamApi = (data) =>{
    return request({
        url: '/assess/exam/add',
        method: 'post',
        data
    })
}

// 修改一个科目 /assess/exam/edit
export const editAssessExamApi = (data) =>{
    return request({
        url: '/assess/exam/edit',
        method: 'put',
        data
    })
}

// 绑定角色学习任务 /assess/exam/roleBindExam
export const examRoleBindExamApi = (data) =>{
    return request({
        url: '/assess/exam/roleBindExam',
        method: 'put',
        data
    })
}

// 解绑角色学习任务 /assess/exam/roleUnbindExam
export const examRoleUnbindExamApi = (data) =>{
    return request({
        url: '/assess/exam/roleUnbindExam',
        method: 'put',
        data
    })
}